package com.nbufe.strategy.demo1;

/**
 * @Author Zan
 * @Create 2024/5/15 14:49
 * @ClassName: Client
 * @Description : TODO 请用一句话描述该类的功能
 */
public class Client {
    public static void main(String[] args) {
        SaleTicket saleTicket1 = new SaleTicket(new VipDiscount());
        saleTicket1.setPrice(30);
        System.out.println(saleTicket1.getPrice());

        System.out.println("==============");

        SaleTicket saleTicket2 = new SaleTicket(new StudentDiscount());
        saleTicket2.setPrice(30);
        System.out.println(saleTicket2.getPrice());

        System.out.println("==============");

        SaleTicket saleTicket3 = new SaleTicket(new YoungDiscount());
        saleTicket3.setPrice(30);
        System.out.println(saleTicket3.getPrice());
    }
}
